/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Vue;

import Entites.Espece;
import com.trolltech.qt.core.QRectF;
import com.trolltech.qt.gui.QColor;
import com.trolltech.qt.gui.QPainter;
import com.trolltech.qt.gui.QPolygon;
import com.trolltech.qt.gui.QStyleOptionGraphicsItem;
import com.trolltech.qt.gui.QWidget;

/**
 *
 * @author Utilisateur
 */
public class PElfe extends PEspece {

    public PElfe(Espece es) {
        super(es);
        color = new QColor(QColor.blue);
    }
    private double adjust = 0.5;
    private QRectF boundingRect = new QRectF(10 - adjust, 10 - adjust,
                                                 5 + adjust, 5 + adjust);

    @Override
    public QRectF boundingRect() {
        return boundingRect;
    }

    @Override
    public void paint(QPainter painter, QStyleOptionGraphicsItem qsogi, QWidget qw) {
        // Body
        painter.setBrush(color);
        QPolygon poly = new QPolygon();
        poly.add(0, 0);
        poly.add(10, 0);
        poly.add(5, 10);
        painter.drawPolygon(poly);
        //painter.drawPixmap(0, 0,new QPixmap("./images/icon.png"));

    }
}
